package com.kaibes.module.user;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

public enum GenderEnum {

    UNKNOWN(0), MALE(1), FEMAL(2);
    
    private Integer value;
    
    @JsonCreator
    private GenderEnum(Integer value) {
        this.value = value;
    }
    
    @JsonValue
    public Integer getValue() {
        return value;
    }
    
    @Override
    public String toString() {
        switch (value) {
        case 0:
            return "未知";
            
        case 1:
            return "男";
            
        case 2:
            return "女";
        }
        return super.toString();
    }
}
